package com.liao.rent.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 订单表
 * </p>
 *
 * @author liao
 * @since 2024-12-06
 */
@Getter
@Setter
@TableName("house_order")
@Schema( description = "HouseOrder对象")
public class HouseOrder implements Serializable {

    private static final long serialVersionUID = 1L;

   @Schema(title ="订单id")
   @TableId(value = "order_id", type = IdType.AUTO)
    private Integer orderId;

   @Schema(title ="租客用户id")
    @TableField("customer_user_id")
    private Integer customerUserId;

   @Schema(title ="房东用户id")
    @TableField("owner_user_id")
    private Integer ownerUserId;

   @Schema(title ="订单状态（1.生效中，2.申请退租，3.已退租，4已过期）")
    @TableField("status")
    private String status;

   @Schema(title ="房源id")
    @TableField("house_id")
    private Integer houseId;

   @Schema(title ="月租")
    @TableField("month_price")
    private BigDecimal monthPrice;

   @Schema(title ="租住天数")
    @TableField("day_num")
    private Integer dayNum;

   @Schema(title ="总金额")
    @TableField("total_amount")
    private BigDecimal totalAmount;

   @Schema(title ="创建人")
    @TableField(value = "create_user",fill = FieldFill.INSERT)
    private Integer createUser;

   @Schema(title ="创建时间")
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    private LocalDateTime createTime;

   @Schema(title ="更新人")
    @TableField(value = "update_user",fill = FieldFill.INSERT_UPDATE)
    private Integer updateUser;

   @Schema(title ="更新时间")
    @TableField(value = "update_time",fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;
}
